package com.stockz.equity.charting.model;

public class Point implements Shape {

	private double price;
	private int index;
	private boolean visible = true;
	
	public Point(){
		this(0,0);
	}
	
	public Point(double price, int index){
		this(price,index,true);
	}
	
	public Point(double price, int index, boolean visible) {
		super();
		this.price = price;
		this.index = index;
		this.visible = visible;
	}

	public Point(Point point){
		this(point.price,point.index);
	}
	
	public boolean equals(Point point){
		return point != null && point.getPrice() == getPrice() && point.getIndex() == getIndex();
	}

	@Override
	public int hashCode() {
		return (String.valueOf(price)+String.valueOf(index)).hashCode();
	}
	
	@Override
	public String toString() {
		return "Price : "+price+", "+"Index : "+index;
	}
	public double getPrice() {
		return price;
	}
	public void setPrice(double price) {
		this.price = price;
	}
	public int getIndex() {
		return index;
	}
	public void setIndex(int index) {
		this.index = index;
	}

	public boolean isVisible() {
		return visible;
	}

	public void setVisible(boolean visible) {
		this.visible = visible;
	}
}
